package com.chj.chuji.tijie14;

//https://blog.csdn.net/qq_35975367/article/details/107852889
//https://blog.csdn.net/qq_35975367/article/details/107852889
//https://blog.csdn.net/qq_43619680/article/details/107711346
public class Section {
	public static void main(String[] args) {
		int l = 2;
		int r = 5;
		int i;
		for (i = 63; i >= 0; i--) {
			if ((l >> i) != r >> i)
				break;
		}
//		cout<<(1ll<<i+1)-1<<endl;
		int res = (1 << (i + 1)) - 1;
		System.out.println(res);
	}
}
